home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks96 / AhhhhhhHack.sit / Ahhhhhh Hack / Ahhhhhh.c < prev    next >
C/C++ Source or Header  |  1996-06-22  |  646b  |  30 lines

  1. #include <A4Stuff.h>
  2. #include <SetupA4.h>
  3. #include <Sound.h>
  4. #include "Ahhhhhh.h"
  5. #include "AhhGlobals.h"
  6. SndListHndl mySoundH = nil;
  7.  
  8. //#define USE_DEBUGGER_CALLS
  9.  
  10. void SetMeUp (void)
  11. {    
  12.     OSErr myErr = 0;
  13.     /* initialize the globals in _this file_ */
  14.  
  15.     mySoundH = (SndListHndl)GetResource(kSoundType,kLoadSoundID);
  16.     myErr = SndPlay(nil, mySoundH, false);
  17.     ReleaseResource((Handle)mySoundH);
  18.     
  19.     mySoundH = (SndListHndl)GetResource(kSoundType,kSoundID);
  20.     DetachResource((Handle)mySoundH);
  21.     myErr = SndPlay(nil, mySoundH, false);
  22. }
  23.  
  24. void PlayMySound( void )
  25. {
  26.     OSErr myErr = 0;
  27.     
  28.     if (mySoundH==nil) return;
  29.     myErr = SndPlay(nil, mySoundH, false);
  30. }